package org.dromara.system.domain.bo;

import org.dromara.system.domain.VariableAssociation;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;

/**
 * 变量业务对象 variable_association
 *
 * @author Lion Li
 * @date 2024-10-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = VariableAssociation.class, reverseConvertGenerate = false)
public class VariableAssociationBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 变量code值
     */
    @NotBlank(message = "变量地址不能为空", groups = {AddGroup.class, EditGroup.class})
    private String code;

    /**
     * 变量名称
     */
    @NotBlank(message = "变量名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 变量别名
     */
    @NotBlank(message = "变量别名不能为空", groups = {AddGroup.class, EditGroup.class})
    private String alias;

    /**
     * 分组id
     */
    @NotNull(message = "分组id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long groupId;

    /**
     * 值
     */
    private BigDecimal value;

    private String unity;

    /**
     * 变量类型1 01类型2 03类型
     */
    @NotNull(message = "变量类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long variableType;

    /**
     * 标识符 代表这个值是放大还是缩小  1缩小2放大
     */
    private Long identifier;

    /**
     * 倍数
     */
    private Long multiple;

    /**
     * 描述
     */
    private String description;

    /**
     * 排序
     */
    private Long sortNum;

    private String valueDescJson;


}
